import { defineLayout, RouteConfig } from "$fresh/server.ts";
import Aside from "./(_components)/aside.tsx";
import { AdminState } from "~/routes/admin/_middleware.ts";
export const config: RouteConfig = {
  skipInheritedLayouts: true,
};
export default defineLayout<AdminState>(
  (_, { Component, state }) => {
    return (
      <div class="admin_layout flex">
        <aside class="h-screen overflow-x-hidden basis-60 md:basis-60 shrink-0 bg-slate-600 text-white">
          <Aside {...state}></Aside>
        </aside>
        <main class=" overflow-x-hidden grow px-4 pt-4 h-screen overflow-y-auto">
          <header>
          </header>
          <section>
            <Component />
          </section>
        </main>
      </div>
    );
  },
);
